package com.gigi.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 文件表
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-03-05
 */
@TableName("file")
@ApiModel(value="FileEntity对象", description="文件表")
public class FileEntity extends Model<FileEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "更新时间")
    @TableField("time")
    private LocalDateTime time;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "父文件夹id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "类型（1文件夹 2图片）")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "文件地址")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "审核状态（0合规 1违规）")
    @TableField("state")
    private Integer state;

    @ApiModelProperty(value = "违规原因")
    @TableField("reason")
    private String reason;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "FileEntity{" +
            "id=" + id +
            ", name=" + name +
            ", time=" + time +
            ", userId=" + userId +
            ", parentId=" + parentId +
            ", type=" + type +
            ", url=" + url +
            ", state=" + state +
            ", reason=" + reason +
        "}";
    }
}
